Subject: Recompiling AppleScript Scripts in FX窶「Mailer
NOTE FOR FX窶「MAILER USERS:
If you are continually being asked to "locate" the FX窶「Engine, FX窶「Packager or HyperCard while using the FX窶「Mailer stack, you may need to recompile the AppleScript scripts in the FX窶「Mailer Stack. To display the AppleScript scripts (which have been placed in buttons), hold down the "option" key and click on the "FX" label in the upper left corner of the current window. Note, both the Reader and Compose cards contain AppleScript scripts in buttons that may have to be recompiled so be sure to "option-click" on the "FX" label in both windows. Display and Save the scripts that are attached to each of the AppleScript based buttons. Once you've recompiled the scripts, AppleScript will no longer ask you to locate the engine or packager. You may re-hide the AppleScript buttons by "option-clicking" on the "FX" labels.</text>
</content>
<name></name>
<script></script>
</card>
card_6042.xml
<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE card PUBLIC "-//Apple, Inc.//DTD card V 2.0//EN" "" >
answer "Sorry, FX窶「Mailer cannot send your message. Please enter an address in the 窶彜end To:窶."
end if
end mouseUp</script>
</part>
<part>
<id>5</id>
<type>button</type>
<visible> <true /> </visible>
<reserved5> 0 </reserved5>
<reserved4> 0 </reserved4>
<reserved3> 0 </reserved3>
<reserved2> 0 </reserved2>
<reserved1> 0 </reserved1>
<enabled> <true /> </enabled>
<rect>
<left>325</left>
<top>56</top>
<right>410</right>
<bottom>69</bottom>
</rect>
<style>standard</style>
<showName> <true /> </showName>
<highlight> <false /> </highlight>
<autoHighlight> <true /> </autoHighlight>
<sharedHighlight> <true /> </sharedHighlight>
<family>0</family>
<titleWidth>0</titleWidth>
<icon>0</icon>
<textAlign>center</textAlign>
<font>Geneva</font>
<textSize>9</textSize>
<textStyle>plain</textStyle>
<name>Clear Compose</name>
<script>on mouseUp
put empty into cd fld sendtoFld
put empty into cd fld subjectFld
put empty into cd fld messageFld
end mouseUp</script>
</part>
<part>
<id>6</id>
<type>button</type>
<visible> <true /> </visible>
<reserved5> 0 </reserved5>
<reserved4> 0 </reserved4>
<reserved3> 0 </reserved3>
<reserved2> 0 </reserved2>
<reserved1> 0 </reserved1>
<enabled> <true /> </enabled>
<rect>
<left>323</left>
<top>30</top>
<right>390</right>
<bottom>44</bottom>
</rect>
<style>checkbox</style>
<showName> <true /> </showName>
<highlight> <true /> </highlight>
<autoHighlight> <true /> </autoHighlight>
<sharedHighlight> <true /> </sharedHighlight>
<family>0</family>
<titleWidth>0</titleWidth>
<icon>0</icon>
<textAlign>center</textAlign>
<font>Geneva</font>
<textSize>9</textSize>
<textStyle>plain</textStyle>
<name>Keep Copy</name>
<script></script>
</part>
<part>
<id>9</id>
<type>button</type>
<visible> <false /> </visible>
<reserved5> 0 </reserved5>
<reserved4> 0 </reserved4>
<reserved3> 0 </reserved3>
<reserved2> 0 </reserved2>
<reserved1> 0 </reserved1>
<enabled> <false /> </enabled>
<rect>
<left>302</left>
<top>2</top>
<right>413</right>
<bottom>18</bottom>
</rect>
<style>opaque</style>
<showName> <true /> </showName>
<highlight> <false /> </highlight>
<autoHighlight> <false /> </autoHighlight>
<sharedHighlight> <true /> </sharedHighlight>
<family>0</family>
<titleWidth>0</titleWidth>
<icon>0</icon>
<textAlign>center</textAlign>
<font>Chicago</font>
<textSize>12</textSize>
<textStyle>plain</textStyle>
<name>asSendFile</name>
<script></script>
</part>
<part>
<id>16</id>
<type>button</type>
<visible> <true /> </visible>
<reserved5> 0 </reserved5>
<reserved4> 0 </reserved4>
<reserved3> 0 </reserved3>
<reserved2> 0 </reserved2>
<reserved1> 0 </reserved1>
<enabled> <true /> </enabled>
<rect>
<left>6</left>
<top>247</top>
<right>62</right>
<bottom>260</bottom>
</rect>
<style>standard</style>
<showName> <true /> </showName>
<highlight> <false /> </highlight>
<autoHighlight> <true /> </autoHighlight>
<sharedHighlight> <true /> </sharedHighlight>
<family>0</family>
<titleWidth>0</titleWidth>
<icon>0</icon>
<textAlign>center</textAlign>
<font>Geneva</font>
<textSize>9</textSize>
<textStyle>plain</textStyle>
<name>Reader窶ヲ</name>
<script>on mouseUp
go card readerCard
end mouseUp</script>
</part>
<part>
<id>18</id>
<type>button</type>
<visible> <true /> </visible>
<reserved5> 0 </reserved5>
<reserved4> 0 </reserved4>
<reserved3> 0 </reserved3>
<reserved2> 0 </reserved2>
<reserved1> 0 </reserved1>
<enabled> <true /> </enabled>
<rect>
<left>2</left>
<top>2</top>
<right>28</right>
<bottom>18</bottom>
</rect>
<style>transparent</style>
<showName> <false /> </showName>
<highlight> <false /> </highlight>
<autoHighlight> <false /> </autoHighlight>
<sharedHighlight> <true /> </sharedHighlight>
<family>0</family>
<titleWidth>0</titleWidth>
<icon>0</icon>
<textAlign>center</textAlign>
<font>Chicago</font>
<textSize>12</textSize>
<textStyle>plain</textStyle>
<name>Show AppleScript Buttons</name>
<script>on mouseUp
if the optionkey is down then
if the visible of cd button asSendFile is true then
set the visible of cd button asSendFile to false
else
set the visible of cd button asSendFile to true
end if
end if
end mouseUp</script>
</part>
<part>
<id>21</id>
<type>button</type>
<visible> <true /> </visible>
<reserved5> 0 </reserved5>
<reserved4> 0 </reserved4>
<reserved3> 0 </reserved3>
<reserved2> 0 </reserved2>
<reserved1> 0 </reserved1>
<enabled> <true /> </enabled>
<rect>
<left>393</left>
<top>1</top>
<right>412</right>
<bottom>19</bottom>
</rect>
<style>transparent</style>
<showName> <false /> </showName>
<highlight> <false /> </highlight>
<autoHighlight> <false /> </autoHighlight>
<sharedHighlight> <true /> </sharedHighlight>
<family>0</family>
<titleWidth>0</titleWidth>
<icon>26635</icon>
<textAlign>center</textAlign>
<font>Chicago</font>
<textSize>12</textSize>
<textStyle>plain</textStyle>
<name></name>
<script>on mouseUp
set the visible of cd button coverUp to true
set the visible of cd fld composeHelp to true
end mouseUp</script>
</part>
<part>
<id>22</id>
<type>button</type>
<visible> <false /> </visible>
<reserved5> 0 </reserved5>
<reserved4> 0 </reserved4>
<reserved3> 0 </reserved3>
<reserved2> 0 </reserved2>
<reserved1> 0 </reserved1>
<enabled> <true /> </enabled>
<rect>
<left>1</left>
<top>1</top>
<right>414</right>
<bottom>262</bottom>
</rect>
<style>transparent</style>
<showName> <false /> </showName>
<highlight> <false /> </highlight>
<autoHighlight> <false /> </autoHighlight>
<sharedHighlight> <true /> </sharedHighlight>
<family>0</family>
<titleWidth>0</titleWidth>
<icon>0</icon>
<textAlign>center</textAlign>
<font>Chicago</font>
<textSize>12</textSize>
<textStyle>plain</textStyle>
<name>coverUp</name>
<script>on mouseUp
send mouseUp to cd fld "composeHelp"
end mouseUp</script>
</part>
<part>
<id>23</id>
<type>field</type>
<visible> <false /> </visible>
<dontWrap> <false /> </dontWrap>
<dontSearch> <false /> </dontSearch>
<sharedText> <false /> </sharedText>
<fixedLineHeight> <false /> </fixedLineHeight>
<autoTab> <false /> </autoTab>
<lockText> <true /> </lockText>
<rect>
<left>8</left>
<top>72</top>
<right>406</right>
<bottom>240</bottom>
</rect>
<style>shadow</style>
<autoSelect> <false /> </autoSelect>
<showLines> <false /> </showLines>
<wideMargins> <true /> </wideMargins>
<multipleLines> <false /> </multipleLines>
<reservedFamily> 0 </reservedFamily>
<titleWidth>0</titleWidth>
<icon>0</icon>
<textAlign>left</textAlign>
<font>Geneva</font>
<textSize>12</textSize>
<textStyle>plain</textStyle>
<textHeight>16</textHeight>
<name>composeHelp</name>
<script>on mouseUp
set the visible of cd button coverUp to false
set the visible of me to false
end mouseUp</script>
</part>
<content>
<layer>card</layer>
<id>23</id>
<text><span class="style2">sing the FX窶「Compose Window
</span><span class="style1">
To send a message, enter the destination address (or addresses) in the 窶彜end To:窶 field, a brief title in the 窶彜ubject窶 field and the text of your message in the primary text field after that. When you're ready to send your message, simply click on the 窶彜end Now!窶 button.
Remember to use valid FX窶「Packager addresses in the 窶彜end To:窶 field like 窶廱ulie[Marketing]窶 or 窶彗Mac.bigCorp.Com窶.
To return to reading your mail click on the 窶彝eader窶ヲ窶 button.</span></text>
</content>
<name>composeCard</name>
<script>-- FX窶「Mailer - Compose Card Script
-- Last Modified: 8/14/95 by MMM
-- A freeware script provided by the Ruskin Group, Inc.
-- This stack may be used for any non-commercial purposes.
-- This handler turns the message into a temporary file and then
-- calls an AppleScript handler to send that file via an FX窶「Packager
on sendMessage
global FXtempfileName
set the cursor to busy
makeMailFile -- take the message and save it in a temporary file
-- We need to convert the address line into a canonical list
-- for AppleScript. The engine is expecting a list of strings that
-- look like: "addr1","addr2","addr3"
-- Note each item is seperated by a comma and enclosed in quotes!
put quote&(item 1 of cd fld sendTofld) into canonicalAddr
put (number of items of cd fld sendToFld) into numOfAddrs
if numOfAddrs 竕・ 1 then
repeat with itemCounter = 2 to (number of items of cd fld sendToFld)
put quote&comma"e&(item itemCounter of cd fld sendToFld) after canonicalAddr
end repeat
end if
-- Add the final quote...
put quote after canonicalAddr
-- Now we'll hand off to an AppleScript script to do the dirty work...
put "sendMessage ""e&FXtempfileName"e&","& ツャ
numOfAddrs into sendParm
global globalAddr
put cd fld sendToFld into globalAddr
send sendParm to cd button "asSendFile"
end sendMessage
-- This handler creates the temporary file that contains
-- the user's message in a canonical format. We'll then use
-- File eXpress to send that file to its destination.
on makeMailFile
global FXstackVersion, FXuserATName, FXuserIPName, FXtempFileName
set the cursor to busy
put getDriveName() into theDrive
put theDrive&":Temporary Items:"&(the ticks)&".fxmsg" into tempFileName
open file tempFileName
-- Just in case we can't find "Temporary Items"...
if the result is not empty then
put theDrive&":"&(the ticks)&".fxmsg" into tempFileName
answer "Couldn窶冲 use 窶弋emporary Items窶 folder, please delete 窶.fxmsg窶 files at your convenience."
open file tempFileName
end if
if the result is empty then
put buildDateTimeStamp() into dateAndTime
write "[FX窶「Mail-"&FXstackVersion&"|"&(the ticks)&"|"&(random(the ticks))&"]"&return to file tempFileName
write "Date: "&dateAndTime&return to file tempFileName
if (FXuserATName is empty) then
write "From: <No AppleTalk Address Available>"&return to file tempFileName
else
write "From: "&FXuserATName&return to file tempFileName
end if
if (FXuserIPName is empty) then
write " <No TCP/IP Address Available>"&return to file tempFileName
else
write " "&FXuserIPName&return to file tempFileName
end if
write "To: "&(cd fld sendtoFld)&return to file tempFileName
write "Subject: "&(cd fld subjectFld)&return to file tempFileName
write return to file tempFileName
write (cd fld messageFld) to file tempFileName
close file tempFileName
if the hilite of card button "Keep Copy" is true then
keepCopyOfMail dateAndTime
end if
else
answer "Error with temp file: 窶"&the result&"窶 - message not sent."
exit to hypercard -- abort now or face the consequences...
end if
put tempFileName into FXtempFileName -- We'll want to delete this later...
end makeMailFile
-- If the user had checked the "Keep Copy" options, then this routine
-- is called and will copy the message in the compose card to the
-- "rawMessages" background. This keeps ups from actually having to
-- use the packager to "send" a message to ourselves.
on keepCopyOfMail dateAndTime
global FXstackVersion, FXuserATName, FXuserIPName, FXtempFileName
global FXcaptionsNeedUpdating
-- Set FXcaptionsNeedUpdating to true so that when it is checked
-- by the openCard handler of the Reader Card we update the captions list.
-- We only need to do this as we're "sneaking" this message into the stack
-- to save the time of actually sending it to ourselves.
put true into FXcaptionsNeedUpdating
set the cursor to busy
lock screen
lock messages
set the cursor to busy
-- Build the rawCaption Item
put "窶「"&dateAndTime into tempCaption
put " " after tempCaption
put char 1 to 25 of cd fld subjectFld after tempCaption
repeat with i = (length of tempCaption) to 45
put " " after tempCaption
end repeat
if char 34 of cd fld subjectFld is not empty then put "窶ヲ" into char 45 of tempCaption
put "=>"&char 1 to 15 of cd fld sendtoFld after tempCaption
repeat with i = (length of tempCaption) to 65
put " " after tempCaption
end repeat
put (the ticks) after tempCaption
-- Build the rawBody Item
put "Date: "&(buildDateTimeStamp())&return into tempBody
if (FXuserATName is empty) then
put "From: <No AppleTalk Address Available>"&return after tempBody
else
put "From: "&FXuserATName&return after tempBody
end if
if (FXuserIPName is empty) then
put " <No TCP/IP Address Available>"&return after tempBody
else
put " "&FXuserIPName&return after tempBody
end if
put "To: "&(cd fld sendtoFld)&return after tempBody
put "Subject: "&(cd fld subjectFld)&return after tempBody
put return after tempBody
put (cd fld messageFld) after tempBody
-- Now create "rawMessages" background card and 'keep copy' of message...
push card
go to last card of background rawmessages
domenu "New Card"
put tempCaption into field rawCaption
put tempBody into field rawBody
pop card
end keepCopyOfMail
on openCard
global FXoriginalTextArrows
-- We like textArrows off for the compose card,
-- but save the old value to restore on close card...
put the textArrows into FXoriginalTextArrows
set the textArrows to true
-- Update the FX窶「Mailer Menu
set the enabled of menuItem "Read Messages" of menu "FX窶「Mailer" to true
set the enabled of menuItem "Compose Message" of menu "FX窶「Mailer" to false
send mouseDown to cd field sendToFld
end openCard
on closeCard
global FXoriginalTextArrows
-- Restore the value of textArrows to what it was before openCard
set the textArrows to FXoriginalTextArrows
end closeCard
-- Allow the enter-key to act as the "Send Now!" button窶ヲ
on enterInfield
send mouseUp to cd button "Send Now!"
end enterInfield</script>
</card>
card_3051.xml
<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE card PUBLIC "-//Apple, Inc.//DTD card V 2.0//EN" "" >
-- A freeware script provided by the Ruskin Group, Inc.
on mouseUp
-- Hand off a full "Update Cations" request to an AppleScript
-- handler that will examine the FX窶「Inbox for message files
-- to be imported into the "rawMessages" background of this stack.
set the cursor to busy
send "loadMessages" to cd button asLoadMessages
end mouseUp</script>
</part>
<part>
<id>12</id>
<type>button</type>
<visible> <false /> </visible>
<reserved5> 0 </reserved5>
<reserved4> 0 </reserved4>
<reserved3> 0 </reserved3>
<reserved2> 0 </reserved2>
<reserved1> 0 </reserved1>
<enabled> <false /> </enabled>
<rect>
<left>195</left>
<top>2</top>
<right>266</right>
<bottom>17</bottom>
</rect>
<style>opaque</style>
<showName> <true /> </showName>
<highlight> <false /> </highlight>
<autoHighlight> <false /> </autoHighlight>
<sharedHighlight> <true /> </sharedHighlight>
<family>0</family>
<titleWidth>0</titleWidth>
<icon>0</icon>
<textAlign>center</textAlign>
<font>Geneva</font>
<textSize>9</textSize>
<textStyle>bold</textStyle>
<name>asDeleteFile</name>
<script></script>
</part>
<part>
<id>13</id>
<type>button</type>
<visible> <false /> </visible>
<reserved5> 0 </reserved5>
<reserved4> 0 </reserved4>
<reserved3> 0 </reserved3>
<reserved2> 0 </reserved2>
<reserved1> 0 </reserved1>
<enabled> <false /> </enabled>
<rect>
<left>269</left>
<top>2</top>
<right>347</right>
<bottom>17</bottom>
</rect>
<style>opaque</style>
<showName> <true /> </showName>
<highlight> <false /> </highlight>
<autoHighlight> <false /> </autoHighlight>
<sharedHighlight> <true /> </sharedHighlight>
<family>0</family>
<titleWidth>0</titleWidth>
<icon>0</icon>
<textAlign>center</textAlign>
<font>Geneva</font>
<textSize>9</textSize>
<textStyle>bold</textStyle>
<name>asUnpackMail</name>
<script></script>
</part>
<part>
<id>14</id>
<type>button</type>
<visible> <true /> </visible>
<reserved5> 0 </reserved5>
<reserved4> 0 </reserved4>
<reserved3> 0 </reserved3>
<reserved2> 0 </reserved2>
<reserved1> 0 </reserved1>
<enabled> <true /> </enabled>
<rect>
<left>6</left>
<top>247</top>
<right>62</right>
<bottom>260</bottom>
</rect>
<style>standard</style>
<showName> <true /> </showName>
<highlight> <false /> </highlight>
<autoHighlight> <true /> </autoHighlight>
<sharedHighlight> <true /> </sharedHighlight>
<family>0</family>
<titleWidth>0</titleWidth>
<icon>0</icon>
<textAlign>center</textAlign>
<font>Geneva</font>
<textSize>9</textSize>
<textStyle>plain</textStyle>
<name>Compose窶ヲ</name>
<script>-- FX窶「Mailer - Compose Button Script
-- Last Modified: 8/12/95 by MMM
-- A freeware script provided by the Ruskin Group, Inc.
on mouseUp
lock screen
go card composeCard
put empty into cd fld sendToFld
put empty into cd fld subjectFld
put empty into cd fld messageFld
unlock screen
click at the loc of cd fld sendToFld
end mouseUp</script>
</part>
<part>
<id>16</id>
<type>button</type>
<visible> <true /> </visible>
<reserved5> 0 </reserved5>
<reserved4> 0 </reserved4>
<reserved3> 0 </reserved3>
<reserved2> 0 </reserved2>
<reserved1> 0 </reserved1>
<enabled> <true /> </enabled>
<rect>
<left>239</left>
<top>88</top>
<right>313</right>
<bottom>102</bottom>
</rect>
<style>checkbox</style>
<showName> <true /> </showName>
<highlight> <true /> </highlight>
<autoHighlight> <true /> </autoHighlight>
<sharedHighlight> <true /> </sharedHighlight>
<family>0</family>
<titleWidth>0</titleWidth>
<icon>0</icon>
<textAlign>center</textAlign>
<font>Geneva</font>
<textSize>9</textSize>
<textStyle>plain</textStyle>
<name>Auto Update</name>
<script></script>
</part>
<part>
<id>17</id>
<type>button</type>
<visible> <false /> </visible>
<reserved5> 0 </reserved5>
<reserved4> 0 </reserved4>
<reserved3> 0 </reserved3>
<reserved2> 0 </reserved2>
<reserved1> 0 </reserved1>
<enabled> <false /> </enabled>
<rect>
<left>351</left>
<top>2</top>
<right>415</right>
<bottom>17</bottom>
</rect>
<style>opaque</style>
<showName> <true /> </showName>
<highlight> <false /> </highlight>
<autoHighlight> <true /> </autoHighlight>
<sharedHighlight> <true /> </sharedHighlight>
<family>0</family>
<titleWidth>0</titleWidth>
<icon>0</icon>
<textAlign>center</textAlign>
<font>Geneva</font>
<textSize>9</textSize>
<textStyle>bold</textStyle>
<name>asGetAddr</name>
<script></script>
</part>
<part>
<id>18</id>
<type>button</type>
<visible> <true /> </visible>
<reserved5> 0 </reserved5>
<reserved4> 0 </reserved4>
<reserved3> 0 </reserved3>
<reserved2> 0 </reserved2>
<reserved1> 0 </reserved1>
<enabled> <true /> </enabled>
<rect>
<left>2</left>
<top>2</top>
<right>28</right>
<bottom>18</bottom>
</rect>
<style>transparent</style>
<showName> <false /> </showName>
<highlight> <false /> </highlight>
<autoHighlight> <false /> </autoHighlight>
<sharedHighlight> <true /> </sharedHighlight>
<family>0</family>
<titleWidth>0</titleWidth>
<icon>0</icon>
<textAlign>center</textAlign>
<font>Chicago</font>
<textSize>12</textSize>
<textStyle>plain</textStyle>
<name>Show AppleScript Buttons</name>
<script>on mouseUp
if the optionkey is down then
if the visible of cd button asDeleteFile is true then
set the visible of cd button asLoadMessages to false
set the visible of cd button asDeleteFile to false
set the visible of cd button asUnpackMail to false
set the visible of cd button asGetAddr to false
else
set the visible of cd button asLoadMessages to true
set the visible of cd button asDeleteFile to true
set the visible of cd button asUnpackMail to true
set the visible of cd button asGetAddr to true
end if
end if
end mouseUp</script>
</part>
<part>
<id>19</id>
<type>button</type>
<visible> <false /> </visible>
<reserved5> 0 </reserved5>
<reserved4> 0 </reserved4>
<reserved3> 0 </reserved3>
<reserved2> 0 </reserved2>
<reserved1> 0 </reserved1>
<enabled> <false /> </enabled>
<rect>
<left>102</left>
<top>2</top>
<right>192</right>
<bottom>17</bottom>
</rect>
<style>opaque</style>
<showName> <true /> </showName>
<highlight> <false /> </highlight>
<autoHighlight> <false /> </autoHighlight>
<sharedHighlight> <true /> </sharedHighlight>
<family>0</family>
<titleWidth>0</titleWidth>
<icon>0</icon>
<textAlign>center</textAlign>
<font>Geneva</font>
<textSize>9</textSize>
<textStyle>bold</textStyle>
<name>asLoadMessages</name>
<script></script>
</part>
<part>
<id>20</id>
<type>button</type>
<visible> <true /> </visible>
<reserved5> 0 </reserved5>
<reserved4> 0 </reserved4>
<reserved3> 0 </reserved3>
<reserved2> 0 </reserved2>
<reserved1> 0 </reserved1>
<enabled> <true /> </enabled>
<rect>
<left>393</left>
<top>1</top>
<right>412</right>
<bottom>19</bottom>
</rect>
<style>transparent</style>
<showName> <false /> </showName>
<highlight> <false /> </highlight>
<autoHighlight> <false /> </autoHighlight>
<sharedHighlight> <true /> </sharedHighlight>
<family>0</family>
<titleWidth>0</titleWidth>
<icon>26635</icon>
<textAlign>center</textAlign>
<font>Chicago</font>
<textSize>12</textSize>
<textStyle>plain</textStyle>
<name></name>
<script>on mouseUp
set the visible of cd button coverUp to true
set the visible of cd fld readerHelp to true
end mouseUp</script>
</part>
<part>
<id>22</id>
<type>button</type>
<visible> <false /> </visible>
<reserved5> 0 </reserved5>
<reserved4> 0 </reserved4>
<reserved3> 0 </reserved3>
<reserved2> 0 </reserved2>
<reserved1> 0 </reserved1>
<enabled> <true /> </enabled>
<rect>
<left>2</left>
<top>0</top>
<right>416</right>
<bottom>264</bottom>
</rect>
<style>transparent</style>
<showName> <false /> </showName>
<highlight> <false /> </highlight>
<autoHighlight> <false /> </autoHighlight>
<sharedHighlight> <true /> </sharedHighlight>
<family>0</family>
<titleWidth>0</titleWidth>
<icon>0</icon>
<textAlign>center</textAlign>
<font>Chicago</font>
<textSize>12</textSize>
<textStyle>plain</textStyle>
<name>coverUp</name>
<script>on mouseUp
send mouseUp to cd fld readerHelp
end mouseUp</script>
</part>
<part>
<id>24</id>
<type>field</type>
<visible> <false /> </visible>
<dontWrap> <false /> </dontWrap>
<dontSearch> <false /> </dontSearch>
<sharedText> <false /> </sharedText>
<fixedLineHeight> <false /> </fixedLineHeight>
<autoTab> <false /> </autoTab>
<lockText> <true /> </lockText>
<rect>
<left>8</left>
<top>35</top>
<right>240</right>
<bottom>239</bottom>
</rect>
<style>shadow</style>
<autoSelect> <false /> </autoSelect>
<showLines> <false /> </showLines>
<wideMargins> <true /> </wideMargins>
<multipleLines> <false /> </multipleLines>
<reservedFamily> 0 </reservedFamily>
<titleWidth>0</titleWidth>
<icon>0</icon>
<textAlign>left</textAlign>
<font>Geneva</font>
<textSize>12</textSize>
<textStyle>plain</textStyle>
<textHeight>16</textHeight>
<name>readerHelp</name>
<script>on mouseUp
set the visible of cd button coverUp to false
set the visible of me to false
end mouseUp</script>
</part>
<content>
<layer>card</layer>
<id>24</id>
<text><span class="style2">sing the FX窶「Reader
</span><span class="style1">
To read a message simply click on its 窶廚aption窶 in the list of messages.
Use the buttons at the bottom of the window to act upon the message you have displayed.
Click on the 窶弑pdate Captions窶 button to load any new messages that may have arrived in your FX窶「Inbox, or turn on the 窶廣uto Update窶 option to have the mailer check on its own.</span></text>
Subject: Recompiling AppleScript Scripts in FX窶「Mailer
NOTE FOR FX窶「MAILER USERS:
If you are continually being asked to "locate" the FX窶「Engine, FX窶「Packager or HyperCard while using the FX窶「Mailer stack, you may need to recompile the AppleScript scripts in the FX窶「Mailer Stack. To display the AppleScript scripts (which have been placed in buttons), hold down the "option" key and click on the "FX" label in the upper left corner of the current window. Note, both the Reader and Compose cards contain AppleScript scripts in buttons that may have to be recompiled so be sure to "option-click" on the "FX" label in both windows. Display and Save the scripts that are attached to each of the AppleScript based buttons. Once you've recompiled the scripts, AppleScript will no longer ask you to locate the engine or packager. You may re-hide the AppleScript buttons by "option-clicking" on the "FX" labels.</text>
</content>
<content>
<layer>card</layer>
<id>8</id>
<text>Recompiling AppleScript Scripts in FX窶「Mailer</text>
</content>
<name>readerCard</name>
<script>-- FX窶「Mailer - Reader Card Script
-- Last Modified: 8/13/95 by MMM
-- A freeware script provided by the Ruskin Group, Inc.
-- This handler allows the stack to "poll" the FX窶「Inbox for
-- new message files. If Auto Update is on, the "Update Captions"
-- functionality will be invoked every minute.
on idle
global FXtickcount
if the hilite of card button "Auto Update" is true then
if the ticks > (FXtickcount+3600) then
put the ticks into FXtickcount
set the cursor to busy
send "loadMessages" to card button "asLoadMessages"
end if
end if
end idle
-- Do some sync'ing every time the user returns to this card:
-- Check the Auto-Update Setting, and the FXcaptionsNeedUpdating Flag
on openCard
global FXoriginalTextArrows
global FXcaptionsNeedUpdating
global FXtickcount
-- Update the FX窶「Mailer Menu
set the enabled of menuItem "Read Messages" of menu "FX窶「Mailer" to false
set the enabled of menuItem "Compose Message" of menu "FX窶「Mailer" to true
-- Check to see if a captions update is in order...
if the hilite of card button "Auto Update" is true then
send mouseUp to card button "Update Captions" -- to look for new mail
put the ticks into FXtickcount
end if
if FXcaptionsNeedUpdating is true then
updateCaptionsList
end if
-- We like textArrows on for the reader, but save the old value
-- to restore on close card...
put the textArrows into FXoriginalTextArrows
set the textArrows to true
end openCard
on closeCard
global FXoriginalTextArrows
-- Restore the value of textArrows to what it was before openCard
set the textArrows to FXoriginalTextArrows
end closeCard
-- The following handler is used to determine what will be put into the "From" field
-- of messages you send to other users. This will allow them to use the "Reply" button
-- to correctly set your address in their "Send To" field.
on setUserName theATName, theIPName
global FXuserATName, FXuserIPName
if (theATName is empty) and (theIPName is empty) then
ask "What shall I use as your FX Address?"
put it into theATName
if it is empty then put getDriveName()&"[*]" into theATName
answer "FX窶「Mailer will use 窶"&theATName&"窶 as your address."
end if
if theIPName is empty then
put "<No TCP/IP Address Available>" into theIPName
end if
if theATName is empty then
put "<No AppleTalk Address Available>" into theATName
end if
put theATName into FXuserATName
put theIPName into FXuserIPName
send "mouseUp" to cd button "Update Captions"
end setUserName
-- Handler scans the "rawMessages" background rebuilding a "caption"
-- entry for each message found. Captions are then placed in the
-- fld captions of this card. Clicking on a caption will then cause
-- the message found in the rawMessages background with the same
-- caption as the one clicked on to be displayed in the body field
-- of this card. Unlike the script for the "Update Captions" button,
-- this handler only builds captions for messages that have already
-- been imported into the stacks "rawMessages" background. See the
-- script in the "Update Captions" button to see how messages are
-- moved from the FX窶「Inbox to the "rawMessages" background.
on updateCaptionsList
global FXcaptionsNeedUpdating
put false into FXcaptionsNeedUpdating -- unset 'dirty' flag for captions
lock screen
lock messages
lock recent
set the cursor to busy
go to first card of background rawMessages
put empty into tempCaptions
repeat (the number of cards in this background) times
set the cursor to busy
if (word 2 of the name of this card is not quote&"templateCard""e) then
put (bg fld rawCaption)&return after tempCaptions
end if
go next
end repeat
go to card "readerCard"
put tempCaptions into cd fld captions
if cd fld captions is not empty then
getMessage
end if
end updateCaptionsList
-- Called by the AppleScript of button asLoadMessages once for every
-- file it finds in the FX窶「Inbox mailbox.
on considerFile fileName
set the cursor to busy
if ("Incoming" is not in fileName) then
if fileName contains ".fxp" then
send "unpackMail ""e&filename"e to cd button asUnpackMail
put char 1 to (length of filename - 4) of fileName into fileName
loadmail fileName
else
loadmail fileName
end if
send "deleteFile ""e&fileName"e to cd button asDeleteFile
end if
end considerFile
-- This handler loads a file from the FX窶「Inbox and puts it into
-- the canonical format of the rawMessages Backgrouns